package com.blb.controller;

import com.blb.entity.Dep;
import com.blb.service.DepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class DepController {

    @Autowired
    private DepService depService;

    //查询所有部门
    @GetMapping("getAllDep")
    public List<Dep> getAllDep(){
       return depService.list();
    }
}
